package thread;

public class ThreadDemo2 {
	public static void main(String[] args) {
		CountThread2 countThread = new CountThread2();
		CountThread2 countThread1 = new CountThread2();
		Thread thread = new Thread(countThread);
		Thread thread1 = new Thread(countThread1);
//		Thread thread = new Thread(countThread, "线程1");
//		Thread thread1 = new Thread(countThread1, "线程2");
//		thread.start();
//		thread1.start();

		for (int i = 0; i < 100; i++) {
			CountThread2 countThread2 = new CountThread2();
			Thread thread2 = new Thread(countThread2,"线程"+i);
			thread2.start();
		}
	}
}
